package com.gitee.wsl.compose.ui.theme

import androidx.compose.runtime.Immutable
import com.gitee.wsl.compose.base.VisualState


fun interface VisualStateScheme<T> {
    fun schemeFor(state: VisualState): T
}

@Immutable
data class PentaVisualScheme<T>(
    val default: T,
    val hovered: T,
    val pressed: T,
    val disabled: T,
    val focused: T = default
) : VisualStateScheme<T> {
    override fun schemeFor(state: VisualState): T = when (state) {
        VisualState.Default -> default
        VisualState.Hovered -> hovered
        VisualState.Pressed -> pressed
        VisualState.Disabled -> disabled
        VisualState.Focused -> focused
    }
}